package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.time.LocalDate;

/**
 * 日志实体类
 */
@TableName("t_log")
@ApiModel(value = "日志实体类", description = "封装日志相关属性")
public class LogBean {
    /**
     * 日志id
     */
    @TableId(value = "pk_logId", type = IdType.AUTO)
    @ApiModelProperty("日志编号")
    private Integer logId;
    /**
     * 日志日期
     */
    @TableField("l_date")
    @ApiModelProperty("日志日期")
    private LocalDate date = LocalDate.now();
    /**
     * 日志内容
     */
    @TableField("l_content")
    @ApiModelProperty("日志内容")
    private String content;

    public LogBean() {
    }

    public LogBean(String content) {
        this.content = content;
    }

    public Integer getLogId() {
        return logId;
    }

    public void setLogId(Integer logId) {
        this.logId = logId;
    }

    public LocalDate getDate() {
        return date;
    }

    public void setDate(LocalDate date) {
        this.date = date;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Override
    public String toString() {
        return "LogBean{" +
                "logId=" + logId +
                ", date=" + date +
                ", content='" + content + '\'' +
                '}' + "\n";
    }
}
